function [failure, success] = linear_fisher(classA1, classA2, classTest, numClassTest)

X = vertcat(classA1,classA2);
y = [];

for k=1:size(classA1)
    y(end+1)=1;
end
for k=1:size(classA2)
    y(end+1)=2;
end

s = size(X);
ret = struct('X', X', 'y', y, 'dim', s(2), 'num_dat', length(y));
model = fld(ret);

yv(1:length(classTest)) = numClassTest;

ypred = linclass(classTest',model);
failure = cerror(ypred,yv);
success = 1-failure;

plot(classTest(:,1), classTest(:,2), 'yo');
hold on
ppatterns(ret);
pline(model);


end
 